package pub.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Goods entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "goods", catalog = "sddf")
public class Goods implements java.io.Serializable {

	// Fields

	private Integer id;
	private Order order;
	private Integer market;
	private String window;
	private String style;
	private String describe;
	private Integer quantity;
	private Long price;

	// Constructors

	/** default constructor */
	public Goods() {
	}

	/** full constructor */
	public Goods(Order order, Integer market, String window, String style, String describe, Integer quantity, Long price) {
		this.order = order;
		this.market = market;
		this.window = window;
		this.style = style;
		this.describe = describe;
		this.quantity = quantity;
		this.price = price;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "orderId", nullable = false)
	public Order getOrder() {
		return this.order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	@Column(name = "market", nullable = false)
	public Integer getMarket() {
		return this.market;
	}

	public void setMarket(Integer market) {
		this.market = market;
	}

	@Column(name = "window", nullable = false, length = 20)
	public String getWindow() {
		return this.window;
	}

	public void setWindow(String window) {
		this.window = window;
	}

	@Column(name = "style", nullable = false, length = 20)
	public String getStyle() {
		return this.style;
	}

	public void setStyle(String style) {
		this.style = style;
	}

	@Column(name = "describe", nullable = false, length = 20)
	public String getDescribe() {
		return this.describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	@Column(name = "quantity", nullable = false)
	public Integer getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	@Column(name = "price", nullable = false, precision = 10, scale = 0)
	public Long getPrice() {
		return this.price;
	}

	public void setPrice(Long price) {
		this.price = price;
	}

}